import time

from common.Base import Base
from selenium.webdriver.common.by import By as by


class Login(Base):
    """表现层"""
    # 登录url
    url = 'https://live.douyin.com/8133398759'

    # 登录按钮
    login_button = (by.ID,'svg_icon_avatar')

    """操作层"""

    def login(self):
        # 打开隐式等待
        self.driver.implicitly_wait(20)

        # 打开登录url并全屏
        self.open_url(self.url)
        self.driver.maximize_window()

        # 点击登录按钮
        self.click(self.login_button)

        time.sleep(30)

if __name__ == '__main__':
    login =Login()
    login.login()




